package com.zhouzhou.fastjava.query;

import java.util.List;
import java.util.Map;

public interface QueryExecutor {

    <T> T queryForObject(String sql, Class<T> requiredType, Object... args);

    List<Map<String, Object>> queryForList(String sql, Object... args);

    QueryResult execute(String module, QueryArgs args) throws Exception;

    /**
     * 获取模板sql查询，根据QueryArgs查询所有数据，不排序 不分页
     *
     * @param module
     * @param args
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> queryForListByModule(String module, QueryArgs args) throws Exception;

}
